using System;
using System.Diagnostics;
using System.Globalization;

namespace Atomic.Libraries.Physics.Units
{
	[Serializable]
	[DebuggerDisplay("{DebuggerDisplay}")]
	public class PressurePerTemperature : IQuantity
	{
		private double value;

		public PressurePerTemperature(double value)
		{
			this.value = value;
		}

		public static PressurePerTemperature FromUnit(IUnitSystem system, double value)
		{
			return new PressurePerTemperature(value / (system.EnergyScaling / (system.LengthScaling * system.LengthScaling * system.LengthScaling * system.TemperatureScaling)));
		}

		public static PressurePerTemperature FromElectronVoltPerCubicAngstromPerKelvin(double value)
		{
			return FromUnit(UnitSystem.AtomicSystem, value);
		}

		public double ToUnit(IUnitSystem system)
		{
			return value * system.EnergyScaling / (system.LengthScaling * system.LengthScaling * system.LengthScaling * system.TemperatureScaling);
		}

		public double ToElectronVoltPerCubicAngstromPerKelvin()
		{
			return ToUnit(UnitSystem.AtomicSystem);
		}

		public static implicit operator double(PressurePerTemperature value)
		{
			return value.ToElectronVoltPerCubicAngstromPerKelvin();
		}

		public static implicit operator PressurePerTemperature(double value)
		{
			return FromElectronVoltPerCubicAngstromPerKelvin(value);
		}

		private string DebuggerDisplay
		{
			get
			{
				return "";
			}
		}
	}
}
